const express = require('express');
const router = express.Router();

router.get('/forCurrentUser', (req, res) => {
    const content = [];
    for(let i = 0; i < 40; i++) content.push({
        id: `${i + 1}`,
        code: 'string',
        dealerCode: 'string',
        dealerName: 'string',
        sourceType: 1,
        brandCode: 'string',
        brandName: 'string',
        customerName: 'string',
        gender: 1,
        contactNumber: 'string',
        intentLevel: 1,
        informationSource: 1,
        status: 1,
        rowVersion: 'string',
        options: [
            'abandon'
        ],
    });
    res.json({
        message: '',
        payload: {
            content,
            totalElements: 40,
        }
    });
});
router.get('/:id', (req, res) => {
    res.json(
        {
            message: 'string',
            payload: {
                id: '1',
                code: 'string',
                dealerCode: 'string',
                dealerName: 'string',
                sourceType: 1,
                brandCode: 'string',
                brandName: 'string',
                customerName: 'string',
                gender: 1,
                contactNumber: 'string',
                intentLevel: 1,
                informationSource: 1,
                status: 1,
                rowVersion: 'string',
                birthday: '2020-04-08T08:44:06.527Z',
                address: 'string',
                purchaseBudget: 1,
                intentionModel: 'string',
                remark: 'string',
                creatorName: 'string',
                createTime: '2020-04-08T08:44:06.527Z',
                modiferName: 'string',
                modifyTime: '2020-04-08T08:44:06.527Z',
                abandonerName: 'string',
                abandonTime: '2020-04-08T08:44:06.527Z',
                options: [
                    'abandon'
                ],
            }
        }
    );
});

router.put('/:id/abandon', (req, res) => {
    res.json({
        message: '作废成功'
    });
});

router.get('/export', (req, res) => {
    res.json({
        message: '导出成功'
    });
});
module.exports = router;
